﻿@model PagedList.IPagedList<OES.Models.Question>
@{
    ViewBag.Title = "Soru";
    int i = (ViewBag.PageNumber - 1) * ViewBag.PageSize + 1;
}
@foreach (var item in Model)
{
    <div class="well">
        <h4>@i.</h4>
        @Html.Raw(item.Question_Text)
        <ol>
            @foreach (var Choice in item.Choices)
            {
            
                <li>
                    @if (Choice.TrueAnswer == true)
                    {
                        <div style="color: Red" class="active">@Html.Raw(Choice.ChoiceText)</div> 
                    }
                    else
                    {
                        <div>@Html.Raw(Choice.ChoiceText)</div>
                    }
                </li>
            }
        </ol>
    </div>
            i++;
}
<div class="pagination pagination-centered">

    @Html.Raw("<lu class=\"pager\">")
    @if (Model.HasPreviousPage)
    {
        @Html.Raw("<li>")
        @Html.ActionLink("<<", "Soru", new { page = 1 })
        @Html.Raw("</li>")
        @Html.Raw("<li>")
        @Html.ActionLink("< Geri", "Soru", new { page = Model.PageNumber - 1 })
        @Html.Raw("</li>")
    }
    else
    {
        @Html.Raw("<li class=\"disabled\">")
        <a href="#"><<</a>
        @Html.Raw("</li>")
        @Html.Raw("<li class=\"disabled\">")
        <a href="#">< Geri</a>
        @Html.Raw("</li>")
    }
        Sayfa @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber)
    / @Model.PageCount
 
       
    @if (Model.HasNextPage)
    {
        @Html.Raw("<li>")
        @Html.ActionLink("> İleri", "Soru", new { page = Model.PageNumber + 1 })
        @Html.Raw("</li>")
        @Html.Raw("<li>")
        @Html.ActionLink(">>", "Soru", new { page = Model.PageCount })
        @Html.Raw("</li>")
        
    }
    else
    {
        @Html.Raw("<li class=\"disabled\">")
        <a href="#">> İleri</a>
        @Html.Raw("</li>")
        @Html.Raw("<li class=\"disabled\">")
        <a href="#">>></a>
        @Html.Raw("</li>");
       
    }
    @Html.Raw("</lu>")
</div>
